package com.qf.week1.day02;

import java.util.Scanner;

public class MemberPointsDemo {
    public static void main(String[] args) {
        float x;
        float y;
        System.out.println("请输入积分");
        Scanner sc = new Scanner(System.in);
        x = sc.nextInt();
        System.out.println("请输入实际金额（元）");
        y = sc.nextInt();
        if (x >= 0 && y >= 0) {
            if (x < 2000) {
                y *= 0.9;
            } else if (2000 <= x && x < 4000) {
                y *= 0.8;
            } else if (4000 <= x && x < 8000) {
                y *= 0.7;
            } else {
                y *= 0.6;
            }
            System.out.println("您优惠后的实际金额为：" + y + "元");
        } else {
            System.out.println("输入有误");
        }
    }
}

